<?php

/**
 * This Class is for you.
 * 
 * Feel free to edit this file to extend your models classes.
 * Please, never touch sufixed _protoweb classes
 */

 
/**
 * 
 *
 * @Authors Viera Leonel
 * @package andronotes
 * @subpackage model
 *
 * 
 */
class Usuario extends Usuario_protoweb {

    public function __construct($id = NULL) {
        parent::__construct($id);
    } // end of method __construct($id = NULL)

    public function login() {
        
        $this->where('email', $this->email);
        $this->where('password', $this->password)->get();
        
        if ($this->exists())
            return TRUE;
        else {
            $this->error_message('login', 'email or password invalid');
            return FALSE;
        }
    } // login

} // Class Usuario

/* End of file Usuario.php */
/* Location: ./system/application/models/Usuario.php */